package com.njupt.StringProblem;

import java.util.Scanner;

public class StringRightRotate {

    public String  stringRightRotate(String string,int k){
        int len = string.length();
        int left = len - k;
        String leftString = string.substring(0,left);
        String rightString = string.substring(left,left+k);
        return rightString+leftString;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int k = sc.nextInt();
        sc.nextLine();
        String s = sc.nextLine();
        StringRightRotate test = new StringRightRotate();
        System.out.println(test.stringRightRotate(s, k));
    }
}
